
using System;

using Gtk;

using stefc.geo.data;
using stefc.geo.data.model;

namespace MyLocate.dlg
{

	public partial class ContactProperties : Gtk.Dialog
	{
	
		public static bool Edit(Contact contact)
		{
			bool result=false;
			using(ContactProperties dlg = new ContactProperties())
			{	
				dlg.entryName.Text=contact.Name;
				dlg.entryJId.Text=contact.JId;
				if((ResponseType)dlg.Run()==ResponseType.Ok)
				{
					contact.Name=dlg.entryName.Text.Trim();
					contact.JId=dlg.entryJId.Text.Trim();
					result=true;
				}
				dlg.Destroy();
			}
			return result;
		}
		
		public ContactProperties ()
		{
			this.Build ();
		}
	}
}
